/*
day109
2019.12.15
*/
#include<vector>
#include<iostream>
using namespace std;

class Solution {
public:
    int searchInsert(vector<int>& nums, int target) {
        int l=0,r=nums.size();
        int mid;
        while(l<r)
        {
        	mid=l+(r-l)/2;
        	if(nums[mid]==target) return mid;
        	else if(nums[mid]>target)  r=mid;
        	else l=mid+1;
		}
		return l;
    }
};

int main()
{
	
	Solution s;
//	s.searchInsert()
	return 0;
}
